<?php

namespace App\Models\Oauth;

use Illuminate\Support\Facades\DB;
use App\Models\Model;

class WeiXinUserModel extends Model
{

    const TABLENAME = 'tw_weixin_user';

    /**
     * 初始化并返回数据库请求构建器
     *
     * @return Illuminate\Support\Facades\DB::table(TABLENAME)
     */
    public static function dbTable()
    {
        // return self::dbConnectionClub()->table(self::TABLE_NAME);
        return DB::table(self::TABLENAME);
    }

    /**
     * 添加一个微信企业号记录信息
     */
    public static function addWeiXinUser($data = array())
    {
        return self::dbTable()->insertGetId($data);
    }

}

?>